

package com.hazelcast.jet.impl.execution;

import java.io.Serial;
import java.util.concurrent.CancellationException;

public class ExecutionCancellationException extends CancellationException {
    @Serial
    private static final long serialVersionUID = 1L;

    private final Throwable cause;

    public ExecutionCancellationException(Throwable cause) {
        super(cause.getMessage());
        this.cause = cause;
    }

    @Override
    public synchronized Throwable getCause() {
        return cause;
    }
}
